from django.contrib import admin

# Register your models here.

from .models import Supplier, AssetType, Customer

class SupplierAdmin(admin.ModelAdmin):
    list_display = ['id', 'company', 'address', 'linkname', 'phone', 'status', 'add_time']
    list_filter = ['id', 'company', 'address', 'linkname', 'phone', 'status']
 #   list_editable = ['status']


class AssetTypeAdmin(admin.ModelAdmin):
    list_display = ['id', 'name',  'desc']
    list_filter = ['id', 'name', 'desc']
#    list_editable = ['status']
#  'parent', 'level', 'status',



class CustomerAdmin(admin.ModelAdmin):
    list_display = ['id', 'unit', 'address', 'name', 'phone', 'belongs_to', 'status', 'add_time']
    list_filter = ['id', 'unit', 'address', 'name', 'phone', 'belongs_to', 'status']


admin.site.register(Supplier, SupplierAdmin)
admin.site.register(AssetType, AssetTypeAdmin)
admin.site.register(Customer, CustomerAdmin)